<template>
    <div>
        <div class="bread_crumb">
            <bread-crumb></bread-crumb>
        </div>
        <div class="stu_info_wrap">
            <div class="stu_info">
                <h1 class="stu_info_title">入学考试信息</h1>
                <el-form ref="form" :model="form" label-width="80px">
                    <el-row>
                        <el-col :span="12" :offset="5">
                            <el-form-item label="学号" prop="stu_id">
                                <el-input v-model.trim="form.stu_id"></el-input>
                            </el-form-item>
                            <el-form-item label="姓名" prop="stu_name">
                                <el-input v-model.trim="form.stu_name"></el-input>
                            </el-form-item>
                            <el-form-item label="语文" prop="chinese">
                                <el-input v-model.trim="form.chinese"></el-input>
                            </el-form-item>
                            <el-form-item label="数学" prop="math">
                                <el-input v-model.trim="form.math"></el-input>
                            </el-form-item>
                            <el-form-item label="英语" prop="english">
                                <el-input v-model.trim="form.english"></el-input>
                            </el-form-item>
                            <el-form-item label="文综" prop="wenzong">
                                <el-input v-model.trim="form.wenzong"></el-input>
                            </el-form-item>
                            <el-form-item label="理综" prop="lizong">
                                <el-input v-model.trim="form.lizong"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <div class="c">
                        <el-form-item>
                            <el-button type="primary" :plain="true" @click="onSubmit">提交</el-button>
                            <el-button type="primary" @click="goresult">重置</el-button>
                        </el-form-item>
                    </div>
                </el-form>
            </div>
        </div>

    </div>
</template>

<script>
import { req_entry_grade} from "@/api/gradeInfo.js"
export default {
    data() {
        return {
            form: {
                stu_id: "",
                stu_name: "",
                chinese: "",
                math: "",
                english: "",
                wenzong: "",
                lizong: ""
            },
        };

    },
    methods: {
        async onSubmit() {
            console.log("这是提交");
            let result = await req_entry_grade(this.form);
            console.log(result);
            this.$message({
                message: "数据提交成功",
                type: "success",
                offset: 130,
            })
        },
        goresult() {
            console.log("重置");
            this.$refs.form.resetFields()
        },
    }
}
</script>

<style lang="scss" scoped>
div {
    .bread_crumb {
        height: 30px;
    }

    .stu_info_wrap {
        display: flex;
        justify-content: center;
        align-items: center;
        // align-content: ;

        .stu_info {
            width: 800px;

            .stu_info_title {
                text-align: center;
                margin-bottom: 20px;
            }
        }
        .c{
            margin-left: 300px;
        }
    }
}
</style>